package com.hyk.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hyk.domain.AccountDetail;
import com.hyk.dto.R;
import com.hyk.service.AccountDetailService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;

import javax.annotation.Resource;

@RestController
@Api(tags = "资金流水控制器")
@RequestMapping("/accountDetails")
public class AccountDetailsController {

    @Resource
    private AccountDetailService accountDetailService;

    @GetMapping("/records")
    @ApiOperation("分页查询")
    public R<Page<AccountDetail>> list(@ApiIgnore Page<AccountDetail> page,
                                       Long userId,
                                       String userName,
                                       String mobile,
                                       Long coinId,
                                       String amountStart,
                                       String amountEnd,
                                       Long account_id,
                                       String startTime,
                                       String endTime){
        Page<AccountDetail> page1 = accountDetailService.findByPage(page,userId,userName,mobile,coinId,amountStart,amountEnd,account_id,startTime,endTime);
        return R.ok(page1);
    }

}
